lib/commit: Fix a memory leak of OtChecksum
authorMatthew Leeds <matthew.leeds@endlessm.com>
Thu, 29 Mar 2018 05:03:33 +0000 (22:03 -0700)
committerAtomic Bot <atomic-devel@projectatomic.io>
Thu, 29 Mar 2018 13:45:26 +0000 (13:45 +0000)
Closes: #1521
Approved by: jlebon

src/libostree/ostree-repo-commit.c

index 16081a95c84eabfb2ac0ff20c1dfa6d3a106c4c1..12c4103dc1d9d4d9a3113594ac9b892acbe06fa4 100644 (file)
@@ -1246,7 +1246,7 @@ write_metadata_object (OstreeRepo         *self,
     }
   else
     {
-      OtChecksum checksum = { 0, };
+      g_auto(OtChecksum) checksum = { 0, };
       ot_checksum_init (&checksum);
       gsize len;
       const guint8*bufdata = g_bytes_get_data (buf, &len);